import java.util.Date;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2023-10-18
 * Time: 18:52
 */

class Student {
    private String name;

    private  int age;

    private static String classRoom = "301";

    public Student() {
        //this("wang wu", 28);
        /*this.name = "wang wu";
        this.age = 18;*/
        System.out.println("没有参数的构造方法!");
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("调用两个参数的构造方法!");
    }

    public static String getClassRoom() {
        return classRoom;
    }

    public static void setClassRoom(String classRoom) {
        Student.classRoom = classRoom;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void doClass() {
        System.out.println(this.name + "上课!");
    }

    public void print() {
        funcStatic();
        System.out.println("姓名:" + this.name + " 年龄:" + age);
    }
    //类方法 静态方法
    public static void funcStatic() {
        // this.print();
        System.out.println("funStatic..........");
    }

    public static void main(String[] args) {
        funcStatic();
    }

}

public class Test {

    public static void func1() {
        Scanner scanner = new Scanner(System.in);
    }

    public static void main(String[] args) {
//        Test test = new Test();
//        test.func1();
        //Test.func1();
        func1();
        Student.funcStatic();
        Student.setClassRoom("203");
        System.out.println(Student.getClassRoom());
        Scanner scanner = new Scanner(System.in);
    }

    public static void main5(String[] args) {
        Student student1 = new Student("zhang san", 18);
        Student student2 = new Student("lisi", 28);
        Student student3 = new Student("wang wu", 19);
        // System.out.println(Student.classRoom);
    }

    public static void main4(String[] args) {
        Student student = new Student();
        // student.name = " zhang san";
        student.setName("zhang san");
        student.setAge(10);
        System.out.println(student.getName());
        System.out.println(student.getAge());
        student.print();
    }
    public static void main3(String[] args) {
        Date date = new Date();
    }

    public static void main2(String[] args) {
        Student student = new Student();
        student.print();
    }

    public static void main1(String[] args) {
        Student student = new Student();
        // student.name = " zhang san";
        student.doClass();

        System.out.println("===============");
        Student student2 = new Student();
        student2.print();
    }
}
